using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WebOS.Core.Security.Models.Mapping
{
	public class OrganizationMap : EntityTypeConfiguration<Organization>
	{
		public OrganizationMap()
		{
			// Primary Key
			this.HasKey(t => t.OrgId);

			// Properties
			this.Property(t => t.OrgName)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("Organization");
			this.Property(t => t.OrgId).HasColumnName("OrgId");
			this.Property(t => t.OrgName).HasColumnName("OrgName");
		}
	}
}

